package edu.hawaii.kukui

class Activity {

  String title
  String activityType
  Date eventDate
  Integer expectedDuration
  Date publicationDate
  Date expirationDate
  Integer kukuiNuts
  String description
  String verificationType
  String activityAlias

  String toString() {
    "${title}"
  }

  Date dateCreated
  Date lastUpdated

  static hasMany = [ activityTextAttempts : ActivityTextAttempt, activityVerificationTexts : ActivityVerificationText, activityConfirmationCodes: ActivityConfirmationCode, activityCodeAttempts : ActivityCodeAttempt, activityImageAttempts : ActivityImageAttempt ]

  static constraints = {
    title(maxSize: 900);
    description(maxSize: 2000, nullable: true);
    activityType(inList: ["Event", "Action"])
    verificationType(inList: ["Text_Field", "Upload_Image", "Confirmation_Code"])
    expectedDuration(nullable: true)
    kukuiNuts(nullable: true)
    activityAlias(nullable: true)

  }

  
}
